package de.koller.million.card.engine;

import de.koller.million.card.CNode;
import de.koller.million.card.engine.enc.Encounter;
import de.koller.million.card.engine.item.ItemManager;
import de.koller.million.card.engine.player.PlayerContainer;
import de.koller.million.card.engine.report.Reports;
import de.koller.oceanFramework.tree.Child;

public class CEngine extends CNode {

	@Child public final PlayerContainer playerContainer = new PlayerContainer();
	@Child public final ItemManager itemManager = new ItemManager();

	@Child public final Reports reports = new Reports();
	private Encounter encounter = null;
	
	
	public void setEncounter( Encounter enc ) {
		if( enc == null ) {
			if( this.encounter != null )
				this.encounter.removeMe();
			this.encounter = null;
		}
		
		this.encounter = enc;
		this.addChild( this.encounter );
	}

	public Encounter getEncounter() {
		return encounter;
	}
	
}
